package recallin.social.facebook;

import org.json.JSONException;
import org.json.JSONObject;

import recallin.activities.MainActivity;

import android.app.Activity;
import android.os.Handler;

public class FacebookConnection {

	private Handler mHandler;
	private Activity activity;

	public FacebookConnection(Activity activity) {
		this.activity = activity;
	}

	public class UserRequestListener extends BaseRequestListener {

		@Override
		public void onComplete(final String response, final Object state) {
			JSONObject jsonObject;
			try {
				jsonObject = new JSONObject(response);

				final String picURL = jsonObject.getString("picture");
				final String name = jsonObject.getString("name");
				Utility.userUID = jsonObject.getString("id");

				mHandler.post(new Runnable() {
					@Override
					public void run() {
					}
				});

			} catch (JSONException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}
	
	

}
